# -*- coding:utf-8 -*-
from fastapi import Request
from app.entity.system import SysParam
from core.curd import CRUDBase, IBaseDao
from sqlalchemy.ext.asyncio import AsyncEngine


class SysParamDao(IBaseDao):
    """
    测试模块服务层
    """

    def __init__(self, req: Request):
        self.db_session: AsyncEngine = req.app.state.db_async_session
        self.base = CRUDBase(SysParam)

    @classmethod
    async def instance(cls, req: Request):
        return cls(req)
